﻿using Adnc.Infra.Entities;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace WYT.Usr.Repository.Entities
{
    /// <summary>
    /// 用户关系表
    /// </summary>
    [Table("usr_userRelation"), Comment("用户关系表"),Index(nameof(Ancestor)), Index(nameof(Descendant))]
    public class UserRelation : EfEntity
    {
        /// <summary>
        /// 祖先用户
        /// </summary>
        [Comment("祖先用户")]
        public long Ancestor { get; set; }

        /// <summary>
        /// 后代用户
        /// </summary>
        [Comment("后代用户")]
        public long Descendant { get; set; }

        /// <summary>
        /// 代数
        /// </summary>
        [Comment("代数")]
        public int Level { get;set;}

        /// <summary>
        /// 创建时间
        /// </summary>
        [Comment("创建时间")]
        public DateTime CreateTime { get; set; }
    }
}
